home *** CD-ROM | disk | FTP | other *** search
- <![CDATA[
-
- // object used to hang onto the last retrieved xref/target data
- function CLookupResults() {}
-
- CLookupResults.prototype.Init = function()
- {
- this._href = "BADFOOD";
- this._caption = "BADFOOD";
-
- // delete this._href;
- // delete this._caption;
-
- delete this._item;
- delete this._rid;
- delete this._ionodes;
- delete this._alinkproxy;
- delete this._alink;
- delete this._hxslink;
- delete this._leave;
- }
-
- // What's the href of the target underlying the xref
- CLookupResults.prototype.GetHREF = function()
- {
- return this._href;
- }
-
- CLookupResults.prototype.GetExtendedId = function(){
- return this._extendedRid;
- }
-
- // what's the caption of the target underly the xref?
- CLookupResults.prototype.GetCaption = function()
- {
- return this._caption;
- }
-
- // set the url corr. to the xref
- CLookupResults.prototype.SetHREF = function(s)
- {
- return (this._href = s);
- }
-
- // set the display name corresponding to the xref
- CLookupResults.prototype.SetCaption = function(s)
- {
- if (s)
- this._caption = s;
- }
-
- // cache the js representation of the target
- CLookupResults.prototype.SetItem = function(sRID, oItem)
- {
- this._rid = sRID;
- this._item = oItem;
- }
-
- // retrieve the js representation of the target
- CLookupResults.prototype.GetItem = function()
- {
- if (this._item)
- return this._item;
- else
- return null;
- }
-
- // retrieve the id of the target
- CLookupResults.prototype.GetID = function()
- {
- return this._rid;
- }
-
- // retrieve the type of the target underly the xref
- CLookupResults.prototype.GetType = function()
- {
- return this.GetItem()._type;
- }
-
- // retrieve the persistent name of the target underly the xref
- CLookupResults.prototype.GetPersistentName = function(sAlternate)
- {
- if (this.GetItem() && this.GetItem()._pn)
- var sPN = this.GetItem()._pn;
- else
- var sPN = null;
-
- return (sPN ? sPN : sAlternate);
- }
-
- // how many references to the current xref?
- CLookupResults.prototype.GetCount = function()
- {
- return this.GetItem()._cRefs;
- }
-
- // Does the count of references to the xref exceed iCount?
- CLookupResults.prototype.CountExceeds = function(iCount)
- {
- return ((this.GetItem()._cRefs > iCount) ? true : false);
- }
-
- //at: HXS-specific.
-
- //at: Is media an HXS?
- CLookupResults.prototype.IsHxsLink = function()
- {
- var bHxs = false;
- var oCtx = goLookup._oCtx;
- var sMedia = null;
- //var oTNode = null;
- //var sChm = "";
- //var bOther = false;
-
- if (oCtx)
- {
- sMedia = oCtx._media;
- //oTNode = oCtx._oTDom.firstChild;
-
- //if (oTNode && oTNode.nodeName == "targ")
- // sChm = oTNode.getAttribute("chm");
-
- //if (sChm == "other")
- // bOther = true;
-
- //if (sMedia && sMedia == "hxs" && bOther)
- // bHxs = true;
- if (sMedia && sMedia == "hxs" && this._hxslink)
- bHxs = true;
- }
-
- return (bHxs);
- }
-
- //at: Get the hxs link?
- CLookupResults.prototype.GetHxsLink = function()
- {
- // peterril: should not be used to create links.
- // The tag is generated in stylesheets.
- //return this._hxslink;
- }
-
- // CHM-specific crud
-
- CLookupResults.prototype.IsALink = function()
- {
- return ((this._alink && this._alinkproxy)? true : false);
- }
-
- CLookupResults.prototype.GetALink = function()
- {
- return (this._alink ? this._alink : "");
- }
-
- CLookupResults.prototype.GetALinkProxy = function()
- {
- return (this._alinkproxy ? this._alinkproxy : "");
- }
-
- // acceptable values for sLoc are 'chm' and 'ms'
- // Permanent targets (manually maintained links to external content) may include links to content outside of the company (ms).
- CLookupResults.prototype.LinkLeaves = function(sLoc)
- {
- return (this._leave && this._leave.toLowerCase() == sLoc.toLowerCase() ? true : false)
- }
-
- CLookupResults.prototype.IsPermTarg = function()
- {
- return (this._item && this._item._perm ? true : false)
- }
-
- ]]>
-